<?php
    ####################################################
    # library import and object instance.              #
    ####################################################
    include_once('./common.php');
    include_once('./app_common.php');


    ####################################################
    # request data($_POST AND $_GET FROM $_REQUEST)    #
    ####################################################
    # REQUEST(get and post variables)
    $req = Request::clean_request($_REQUEST, FALSE);

    # GET(url variables)

    # POST(form variables)

    # Validation(special case validate)
    //*/
    #@@todo : php server validation
    Validation::check_is_emptys($req);
    //*/

    ####################################################
    # implementation                                   #
    ####################################################

    //*/
    $ret = $db->que(
        sprintf("UPDATE `%s` SET `name`='%s', `name_eng`='%s', `enable`='%s', `description`='%s' WHERE `fuid`='%s'",
            $ncrud['table_name'],
            $req['name'],
            $req['name_eng'],
            $req['enable'],
            $req['description'],
            $req['fuid']
        )
    );
    //*/
?>
<?php
    $html->custom_header(TITLE);
    $html->custom_js("{$JS}jquery.1.7.1.min.js");
    $html->custom_js("{$JS}lib.control.js");
    $html->custom_css("{$CSS}basic.css");
?>
<?$html->custom_body();?>
<?=$tmp->tiles_header()?>
<h1>app - update_proc</h1>
    <?php if($ret['has']): ?>
        success
    <?php else: ?>
        failed
    <?php endif; ?>
    <br />
    <?=NTool::btn("list", "Mover.href('./app_list.php');");?>
    <span> | </span>
    <?=NTool::btn("back", "Mover.back();");?>
    <?=NTool::btn("index", "Mover.home();");?>
<?=$tmp->tiles_footer()?>
<?php $html->html_footer(); ?>

